HAL DTS macros migration ¶
This section provides information about the HAL DTS macros migration.
Note
Some of the DTS macros have been replaced by sensor-scoped exported functions (Start/StopSensor & IT helpers)
Wake-up EXTI handling are internalized.
HAL DTS enable ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_ENABLE(__HANDLE__)
|
Removed, use HAL functions instead:
hal_status_t HAL_DTS_StartSensor(hal_dts_handle_t *hdts, hal_dts_sensor_t sensor)
hal_status_t HAL_DTS_StartSensor_IT(hal_dts_handle_t *hdts, hal_dts_sensor_t sensor)
|
HAL DTS disable ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_DISABLE(__HANDLE__)
|
Removed, use HAL functions instead:
hal_status_t HAL_DTS_StopSensor(hal_dts_handle_t *hdts, hal_dts_sensor_t sensor)
hal_status_t HAL_DTS_StopSensor_IT(hal_dts_handle_t *hdts, hal_dts_sensor_t sensor)
|
HAL DTS enable IT ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_ENABLE_IT(__HANDLE__, __INTERRUPT__)
|
__STATIC_INLINE void HAL_DTS_EnableIT(hal_dts_handle_t *hdts, uint32_t interrupt)
|
HAL DTS disable IT ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_DISABLE_IT(__HANDLE__, __INTERRUPT__)
|
__STATIC_INLINE void HAL_DTS_DisableIT(hal_dts_handle_t *hdts, uint32_t interrupt)
|
HAL DTS get IT source ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
|
__STATIC_INLINE uint32_t HAL_DTS_IsEnabledIT(hal_dts_handle_t *hdts, uint32_t interrupt)
|
HAL DTS get flag ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_GET_FLAG(__HANDLE__, __FLAG__)
|
__STATIC_INLINE uint32_t HAL_DTS_IsActiveFlag(const hal_dts_handle_t *hdts, uint32_t flag)
|
HAL DTS clear flag ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_CLEAR_FLAG(__HANDLE__, __FLAG__)
|
__STATIC_INLINE void HAL_DTS_ClearFlag(hal_dts_handle_t *hdts, uint32_t flag)
|
HAL DTS reset handle state ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_RESET_HANDLE_STATE(__HANDLE__)
|
Removed from HAL2(Use HAL_DTS_DeInit() instead to reset all states)
|
HAL DTS get trigger ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_GET_TRIGGER(__HANDLE__)
|
Removed, use HAL function instead:
hal_dts_trigger_t HAL_DTS_GetSensorTrigger(const hal_dts_handle_t *hdts, hal_dts_sensor_t sensor)
|
HAL DTS get refclk ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_GET_REFCLK(__HANDLE__, __REFCLK__)
|
Removed, use HAL function instead:
uint32_t HAL_DTS_GetConfig(const hal_dts_handle_t *hdts, hal_dts_config_t *p_config)
|
HAL DTS EXTI Wakeup macros ¶
|
HAL1 |
HAL2 |
|---|---|
#define __HAL_DTS_EXTI_WAKEUP_ENABLE_IT()
#define __HAL_DTS_EXTI_WAKEUP_DISABLE_IT()
#define __HAL_DTS_EXTI_WAKEUP_ENABLE_EVENT()
#define __HAL_DTS_EXTI_WAKEUP_DISABLE_EVENT()
|
All of the DTS associated EXTI lines are removed from the DTS driver in HAL2.
Please check the EXTI Migration guide for more details
|